package com.sky.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("merchant_withdrawal")
public class MerchantWithdrawal {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long merchantId;
    private BigDecimal requestAmount;
    private BigDecimal shareRatio; // 0-1
    private BigDecimal totalIncomeSnapshot;
    private BigDecimal balanceSnapshot;
    /** PENDING / COMPLETED / REJECTED */
    private String status;
    private LocalDateTime requestTime;
    private LocalDateTime processedTime;
    private Long processedByStudentId;
    private String rejectReason;
    private BigDecimal payoutAmount; // 实际支出
    private Integer isDeleted; // 0/1
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
}